<template>
  <van-nav-bar
      fixed
      title="提现记录"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
  />
  <van-divider></van-divider>
  <van-divider></van-divider>

  <div v-for="item in list" :key="item.id">
    <van-cell :value="item.created_at">
      <!-- 使用 title 插槽来自定义标题 -->
      <template #title>
        <span class="custom-title">{{item.money}}</span>
        <van-tag v-if="item.status==1">等待审核</van-tag>
        <van-tag v-if="item.status==2">已打款</van-tag>
        <van-tag v-if="item.status==-1">已拒绝</van-tag>
      </template>
    </van-cell>
  </div>
</template>

<script>
import {withdrawLog} from "@/api/user";

export default {
  name: "WithdrawLog",
  data(){
    return {
      list:{}
    }
  },
  created() {
    withdrawLog().then((res)=>{
      this.list = res.data
    })
  },
  methods:{
    onClickLeft(){
      this.$router.go(-1)
    }
  }

}
</script>

<style scoped>

</style>
